<?php
/**
 * This file is form http://findcat.cn
 *
 * @link     https://findcat.cn
 * @email    1476982312@qq.com
 */
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFriendlyLinksTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('friendly_links', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('admin_user_id')->comment('管理员用户id');
            $table->unsignedBigInteger('user_id')->comment('用户id');
            $table->string('name')->comment('友情链接名称');
            $table->string('url')->comment('链接地址');
            $table->string('description')->nullable()->comment('描述');
            $table->unsignedInteger('sort')->comment('排序');
            $table->boolean('status')->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('friendly_links');
    }
}
